export namespace ServerMessage {
	export class C2M_TestRequest implements Chaos.IActorLocationRequest {
		public readonly Opcode: number = 10002;
		public RpcId: number = 0;

		public Content: string;

		constructor(content: string = '') {
			this.Content = content;
		}
	}

	export class M2C_TestResponse implements Chaos.IActorLocationResponse {
		public readonly Opcode: number = 10003;
		public RpcId: number = 0;

		public Error: number;

		public Message: string;

		public Content: string;

		constructor(error: number = 0, message: string = '', content: string = '') {
			this.Error = error;
			this.Message = message;
			this.Content = content;
		}
	}

	export class Actor_TransferRequest implements Chaos.IActorLocationRequest {
		public readonly Opcode: number = 10004;
		public RpcId: number = 0;

		public MapIndex: number;

		constructor(mapIndex: number = 0) {
			this.MapIndex = mapIndex;
		}
	}

	export class Actor_TransferResponse implements Chaos.IActorResponse {
		public readonly Opcode: number = 10005;
		public RpcId: number = 0;

		public Error: number;

		public Message: string;

		constructor(error: number = 0, message: string = '') {
			this.Error = error;
			this.Message = message;
		}
	}

	export class C2G_EnterMap implements Chaos.IRequest {
		public readonly Opcode: number = 10006;
		public RpcId: number = 0;

		constructor() {
		}
	}

	export class G2C_EnterMap implements Chaos.IResponse {
		public readonly Opcode: number = 10007;
		public RpcId: number = 0;

		public Error: number;

		public Message: string;

		public Id: number;

		constructor(error: number = 0, message: string = '', id: number = 0) {
			this.Error = error;
			this.Message = message;
			this.Id = id;
		}
	}

	export class MoveInfo {
		public X: Array<number>;

		public Y: Array<number>;

		public Z: Array<number>;

		public A: number;

		public B: number;

		public C: number;

		public W: number;

		public TurnSpeed: number;

		constructor(x: Array<number> = [], y: Array<number> = [], z: Array<number> = [], a: number = 0, b: number = 0, c: number = 0, w: number = 0, turnSpeed: number = 0) {
			this.X = x;
			this.Y = y;
			this.Z = z;
			this.A = a;
			this.B = b;
			this.C = c;
			this.W = w;
			this.TurnSpeed = turnSpeed;
		}
	}

	export class UnitInfo {
		public UnitId: number;

		public ConfigId: number;

		public Type: number;

		public X: number;

		public Y: number;

		public Z: number;

		public ForwardX: number;

		public ForwardY: number;

		public ForwardZ: number;

		public Ks: Array<number>;

		public Vs: Array<number>;

		public MoveInfo: MoveInfo;

		constructor(unitId: number = 0, configId: number = 0, type: number = 0, x: number = 0, y: number = 0, z: number = 0, forwardX: number = 0, forwardY: number = 0, forwardZ: number = 0, ks: Array<number> = [], vs: Array<number> = [], moveInfo: MoveInfo =  new MoveInfo()) {
			this.UnitId = unitId;
			this.ConfigId = configId;
			this.Type = type;
			this.X = x;
			this.Y = y;
			this.Z = z;
			this.ForwardX = forwardX;
			this.ForwardY = forwardY;
			this.ForwardZ = forwardZ;
			this.Ks = ks;
			this.Vs = vs;
			this.MoveInfo = moveInfo;
		}
	}

	export class M2C_CreateUnits implements Chaos.IActorMessage {
		public readonly Opcode: number = 10008;
		public Units: Array<UnitInfo>;

		constructor(units: Array<UnitInfo> = []) {
			this.Units = units;
		}
	}

	export class M2C_CreateUnit implements Chaos.IActorMessage {
		public readonly Opcode: number = 10009;
		public Unit: UnitInfo;

		constructor(unit: UnitInfo =  new UnitInfo()) {
			this.Unit = unit;
		}
	}

	export class M2C_StartSceneChange implements Chaos.IActorMessage {
		public readonly Opcode: number = 10010;
		public InstanceId: number;

		public Name: string;

		constructor(instanceId: number = 0, name: string = '') {
			this.InstanceId = instanceId;
			this.Name = name;
		}
	}

	export class M2C_RemoveUnits implements Chaos.IActorMessage {
		public readonly Opcode: number = 10011;
		public Units: Array<number>;

		constructor(units: Array<number> = []) {
			this.Units = units;
		}
	}

	export class C2M_PathfindingResult implements Chaos.IActorLocationMessage {
		public readonly Opcode: number = 10012;
		public RpcId: number = 0;

		public X: number;

		public Y: number;

		public Z: number;

		constructor(x: number = 0, y: number = 0, z: number = 0) {
			this.X = x;
			this.Y = y;
			this.Z = z;
		}
	}

	export class C2M_Stop implements Chaos.IActorLocationMessage {
		public readonly Opcode: number = 10013;
		public RpcId: number = 0;

		constructor() {
		}
	}

	export class M2C_PathfindingResult implements Chaos.IActorMessage {
		public readonly Opcode: number = 10014;
		public Id: number;

		public X: number;

		public Y: number;

		public Z: number;

		public Xs: Array<number>;

		public Ys: Array<number>;

		public Zs: Array<number>;

		constructor(id: number = 0, x: number = 0, y: number = 0, z: number = 0, xs: Array<number> = [], ys: Array<number> = [], zs: Array<number> = []) {
			this.Id = id;
			this.X = x;
			this.Y = y;
			this.Z = z;
			this.Xs = xs;
			this.Ys = ys;
			this.Zs = zs;
		}
	}

	export class M2C_Stop implements Chaos.IActorMessage {
		public readonly Opcode: number = 10015;
		public Error: number;

		public Id: number;

		public X: number;

		public Y: number;

		public Z: number;

		public A: number;

		public B: number;

		public C: number;

		public W: number;

		constructor(error: number = 0, id: number = 0, x: number = 0, y: number = 0, z: number = 0, a: number = 0, b: number = 0, c: number = 0, w: number = 0) {
			this.Error = error;
			this.Id = id;
			this.X = x;
			this.Y = y;
			this.Z = z;
			this.A = a;
			this.B = b;
			this.C = c;
			this.W = w;
		}
	}

	export class C2G_Ping implements Chaos.IRequest {
		public readonly Opcode: number = 10016;
		public RpcId: number = 0;

		constructor() {
		}
	}

	export class G2C_Ping implements Chaos.IResponse {
		public readonly Opcode: number = 10017;
		public RpcId: number = 0;

		public Error: number;

		public Message: string;

		public Time: number;

		constructor(error: number = 0, message: string = '', time: number = 0) {
			this.Error = error;
			this.Message = message;
			this.Time = time;
		}
	}

	export class G2C_Test implements Chaos.IMessage {
		public readonly Opcode: number = 10018;
		constructor() {
		}
	}

	export class C2M_Reload implements Chaos.IRequest {
		public readonly Opcode: number = 10019;
		public RpcId: number = 0;

		public Account: string;

		public Password: string;

		constructor(account: string = '', password: string = '') {
			this.Account = account;
			this.Password = password;
		}
	}

	export class M2C_Reload implements Chaos.IResponse {
		public readonly Opcode: number = 10020;
		public RpcId: number = 0;

		public Error: number;

		public Message: string;

		constructor(error: number = 0, message: string = '') {
			this.Error = error;
			this.Message = message;
		}
	}

	export class C2R_Login implements Chaos.IRequest {
		public readonly Opcode: number = 10021;
		public RpcId: number = 0;

		public Account: string;

		public Password: string;

		constructor(account: string = '', password: string = '') {
			this.Account = account;
			this.Password = password;
		}
	}

	export class R2C_Login implements Chaos.IResponse {
		public readonly Opcode: number = 10022;
		public RpcId: number = 0;

		public Error: number;

		public Message: string;

		public Address: string;

		public Key: number;

		public GateId: number;

		constructor(error: number = 0, message: string = '', address: string = '', key: number = 0, gateId: number = 0) {
			this.Error = error;
			this.Message = message;
			this.Address = address;
			this.Key = key;
			this.GateId = gateId;
		}
	}

	export class C2G_LoginGate implements Chaos.IRequest {
		public readonly Opcode: number = 10023;
		public RpcId: number = 0;

		public Key: number;

		public GateId: number;

		constructor(key: number = 0, gateId: number = 0) {
			this.Key = key;
			this.GateId = gateId;
		}
	}

	export class G2C_LoginGate implements Chaos.IResponse {
		public readonly Opcode: number = 10024;
		public RpcId: number = 0;

		public Error: number;

		public Message: string;

		public PlayerId: number;

		constructor(error: number = 0, message: string = '', playerId: number = 0) {
			this.Error = error;
			this.Message = message;
			this.PlayerId = playerId;
		}
	}

	export class G2C_TestHotfixMessage implements Chaos.IMessage {
		public readonly Opcode: number = 10025;
		public Content: string;

		constructor(content: string = '') {
			this.Content = content;
		}
	}

	export class C2M_TestRobotCase implements Chaos.IActorLocationRequest {
		public readonly Opcode: number = 10026;
		public RpcId: number = 0;

		public N: number;

		constructor(n: number = 0) {
			this.N = n;
		}
	}

	export class M2C_TestRobotCase implements Chaos.IActorLocationResponse {
		public readonly Opcode: number = 10027;
		public RpcId: number = 0;

		public Error: number;

		public Message: string;

		public N: number;

		constructor(error: number = 0, message: string = '', n: number = 0) {
			this.Error = error;
			this.Message = message;
			this.N = n;
		}
	}

	export class C2M_TransferMap implements Chaos.IActorLocationRequest {
		public readonly Opcode: number = 10028;
		public RpcId: number = 0;

		constructor() {
		}
	}

	export class M2C_TransferMap implements Chaos.IActorLocationResponse {
		public readonly Opcode: number = 10029;
		public RpcId: number = 0;

		public Error: number;

		public Message: string;

		constructor(error: number = 0, message: string = '') {
			this.Error = error;
			this.Message = message;
		}
	}

}
